let Name: string = '我是一个好学生';
Name = 66666;
const myName: string = '常量';
myName = '常';

let buer: boolean = false;
let shuzi: number = 12;
let shifu: string = '字符串';
let kongzhi: void = null;
let shu_zhu: number[] = [1, 2, 3];
let obj: object = null;
//let asd: any = 'asda';

const jian_zhi: object = { 'name': '张三', 'sex': '男', 'age': 23 };

function add_a(1,2) {

};

function qw(x: string, y?: string, s?: string) {
	return x + y;
}
qw('1');
qw('1', 'a');
qw('qw', 'sa', 'as');

function xing_ming(a: string, b: string, c?: string) {
	return a + '' + b + '' + c;
}
xing_ming("杰克", 'j', '汤姆');
xing_ming("杰", 'asd');

function buildName(firstName: string, lastName = "Smith") {
	return firstName + " " + lastName;
}
buildName();

function xing_ming1(a: string | number | boolean, ...b: string[]) {
	return a + '' + b.join(' ');//按照空格分割
}
xing_ming1("杰克", 'j', '汤姆');
xing_ming1("杰", 'asd');
xing_ming1(12);
xing_ming1(false);

function pin_jie(a: string | number, b: string | number) {
	if (typeof a === 'number' && typeof b === 'number') {
		return a + b;
	} else {
		return a + '' + b;
	}
}